home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / util / utlsrc37.zoo / Makefile.gcross < prev    next >
Encoding:
Makefile  |  1992-11-06  |  1.9 KB  |  92 lines

  1. #
  2. # Makefile for utils for Atari Cross Compilers
  3. # - adjust CROSSDIR below for your setup
  4. # - define GCC to be the path to your hosts C compiler (gcc preferred)
  5. # - If you are going to run the cross linker on a machine that aligns structures
  6. #   at longword boundaries (machines such as Sun-Sparc, Convex etc) add
  7. #   -DWORD_ALIGNED to CFLAGS
  8. # - If you are going to run the cross linker on a machine that has the opposite
  9. #    byte sex to a m68k, ie a little endian host, the add -DBYTE_SWAP to CFLAGS.
  10. #
  11. #
  12. CROSSDIR = /net/acae127/home/bammi/atari/cross-gcc
  13. CROSSBIN = $(CROSSDIR)/bin
  14. CROSSLIB = $(CROSSDIR)/lib
  15. CROSSINC = $(CROSSDIR)/include
  16.  
  17. # Host GCC
  18. CC=cc
  19. # Host include dir
  20. HOSTINC = /usr/include
  21.  
  22. CFLAGS = -g -I. -I$(HOSTINC) -I$(CROSSINC) -DCROSSATARI=1 \
  23. -DCROSSDIR=\"$(CROSSDIR)\" -DCROSSLIB=\"$(CROSSLIB)\" -DWORD_ALIGNED=1
  24.  
  25. ALL = ld sym-ld nm car size size68 tnm xstrip fixstk printstk
  26.  
  27. all: $(ALL)
  28. #
  29. # the 'regular' linker, produces atari executables
  30. #
  31. ld : ld.o cplusdem.o
  32.     $(CC) -o ld ld.o cplusdem.o -lg
  33.  
  34. #
  35. # the 'other' linker, produces atari gdb compat symb files
  36. #
  37. sym-ld : sym-ld.o cplusdem.o
  38.     $(CC) -o sym-ld sym-ld.o cplusdem.o -lg
  39.  
  40. #
  41. # obj file describer?
  42. #
  43. nm : nm.o cplusdem.o
  44.     $(CC) -o nm nm.o cplusdem.o -lg
  45.  
  46. # Object file sizes
  47. #
  48. size: size.o
  49.     $(CC) -o size size.o -lg
  50.  
  51. #
  52. # ar - archiver/librarian
  53. #
  54. car : ar.o
  55.     $(CC) -o car ar.o -lg
  56.  
  57. #
  58. # TOS executable file sizes
  59. #
  60. size68: size68.o
  61.     $(CC) -o size68 size68.o -lg
  62.  
  63. #
  64. # TOS format symbol dumper
  65. #
  66. tnm: cnm.o
  67.     $(CC) -o tnm cnm.o -lg
  68.  
  69. #
  70. # TOS format symbol table stripper
  71. #
  72. xstrip: strip.o
  73.     $(CC) -o xstrip strip.o -lg
  74.  
  75. install: $(ALL)
  76.     cp ld $(CROSSLIB)/gcc-ld
  77.     cp nm $(CROSSBIN)/cnm
  78.     cp car $(CROSSBIN)/car
  79.     cp size $(CROSSBIN)/csize
  80.     cp size68 $(CROSSBIN)/csize68
  81.     cp tnm $(CROSSBIN)/tnm
  82.     cp xstrip $(CROSSBIN)/xstrip
  83.     cp sym-ld $(CROSSBIN)/sym-ld
  84.     cp  fixstk printstk $(CROSSBIN)
  85.  
  86. clean:
  87.     rm -f *.o
  88.  
  89. realclean: clean
  90.     rm -f $(ALL) core report
  91.